<cfsetting enablecfoutputonly="true" />
<!--- 
@title: defaultHtmlHead
@description: Loads specific information into the <head> block of the (x)html page
--->

<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />

<cfif not thistag.HasEndTag>
  <cfabort showerror="Does not have an end tag..." />
</cfif>

<cfparam name="attributes.bLoadPluginCssFile" default="true" type="boolean" />
<cfparam name="attributes.bLoadJsFile" default="true" type="boolean" />

<cfif thistag.ExecutionMode EQ "Start">
  <cfsavecontent variable="jcFarcryFlvPlayerHead">
    <cfif attributes.bLoadPluginCssFile is true>

<!--- Output Stylesheets for HEAD --->
<cfoutput>
  <link rel="stylesheet" type="text/css" media="all" href="#application.stplugins.jcfarcryflvplayer.url.pluginroot#/css/jcFarcryFlvPlayer.css" />
  <!--[if IE]>
    <link rel="stylesheet" type="text/css" media="all" href="#application.stplugins.jcfarcryflvplayer.url.pluginroot#/css/jcFarcryFlvPlayer_ie.css" />
  <![endif]-->
  <!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" media="all" href="#application.stplugins.jcfarcryflvplayer.url.pluginroot#/css/jcFarcryFlvPlayer_ie6.css" />
  <![endif]-->
</cfoutput>

    </cfif>
    <cfif attributes.bLoadJsFile is true>
      <cfoutput><script type="text/javascript" src="#application.stplugins.jcfarcryflvplayer.url.pluginroot#/js/swfobject.js"></script>#chr(10)##chr(13)#</cfoutput>
    </cfif>
  </cfsavecontent>
  <cfif len(trim(variables.jcFarcryFlvPlayerHead)) gt 0>
    <!--- <cfhtmlhead text="#variables.jcFarcryFlvPlayerHead#" /> --->
    <!--- Warning: the htmlhead tag adds a lot of tabbed whitespace.  There's nothing I can do about it (I need the htmlHead tag to overcome caching issues using the objectBroker) --->
    <skin:htmlHead>
      <cfoutput>#variables.jcFarcryFlvPlayerHead#</cfoutput>
    </skin:htmlHead>
  </cfif>
</cfif>

<cfif thistag.ExecutionMode EQ "End">
  <!--- Do Nothing --->
</cfif>

<cfsetting enablecfoutputonly="false" />